// app.js

App({
  onLaunch() {
    
  },
  // 静态资源前缀
  sourceUrl: 'image/',
  // 服务器资源前缀
  fileHost: '',
  globalData: {
    tabbarActive: 0,
    loginState: false,
    userInfo: null,
    tenantId: 1,
    accessToken: null,
    expiresTime: null,
    openid: null,
    refreshToken: null,
    userId: null
  },
  logout() {
    wx.removeStorageSync('token')
    this.globalData = {
      tabbarActive: 0,
      loginState: false,
      userInfo: null,
      tenantId: 1,
      accessToken: null,
      expiresTime: null,
      openid: null,
      refreshToken: null,
      userId: null
    }
    wx.switchTab({
      url: '/pages/home/home'
    })
  }
})